package com.godyao.mall.goods.api.feign.fallback;

import com.godyao.mall.core.model.ResultCode;
import com.godyao.mall.core.model.ResultMsg;
import com.godyao.mall.core.model.goods.Goods;
import com.godyao.mall.goods.api.feign.GoodsFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author godyao
 * @date 2022/4/3
 */
@Slf4j
@Component
public class GoodsFeignFallback implements GoodsFeign {
    @Override
    public ResultMsg<Goods> findGoodsByGoodsId(Long goodsId) {
        log.error("Goods Server Fallback..........");
        return ResultMsg.resultFail(ResultCode.SERVER_FALLBACK.getCode(),ResultCode.SERVER_FALLBACK.getMsg());
    }
}
